package com.joysuch.wwyt.core.exception;

import com.joysuch.wwyt.core.enums.Status;

/**
 * 描述：用户操作类业务异常<br>
 *
 * @author <br>
 * @version 1.0 <br>
 *          日期：2021年04月16日 下午4:00:47
 */
public class ApiBusinessException extends ApiCoreException {

	private int code;

	public ApiBusinessException(Status status) {
		super(status.getCode(), status.getMsg());
		this.code = status.getCode();
	}

	public ApiBusinessException(Status status, String msgPram) {
		super(status.getCode(), String.format(status.getMsg(), msgPram));
		this.code = status.getCode();
	}

	public ApiBusinessException(int code, String msg) {
		super(code, msg);
		this.code = code;
	}

	public int getCode() {
		return code;
	}
}
